3.7.62 \(\int \frac {x^{-1+2 n} (a+b x^n)}{c+d x^n} \, dx\)

Optimal. Leaf size=60 \[ \frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n}-\frac {x^n (b c-a d)}{d^2 n}+\frac {b x^{2 n}}{2 d n} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {446, 77} \begin {gather*} -\frac {x^n (b c-a d)}{d^2 n}+\frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n}+\frac {b x^{2 n}}{2 d n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^(-1 + 2*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

-(((b*c - a*d)*x^n)/(d^2*n)) + (b*x^(2*n))/(2*d*n) + (c*(b*c - a*d)*Log[c + d*x^n])/(d^3*n)

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {x^{-1+2 n} \left (a+b x^n\right )}{c+d x^n} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x (a+b x)}{c+d x} \, dx,x,x^n\right )}{n}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {-b c+a d}{d^2}+\frac {b x}{d}+\frac {c (b c-a d)}{d^2 (c+d x)}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {(b c-a d) x^n}{d^2 n}+\frac {b x^{2 n}}{2 d n}+\frac {c (b c-a d) \log \left (c+d x^n\right )}{d^3 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 50, normalized size = 0.83 \begin {gather*} \frac {d x^n \left (2 a d-2 b c+b d x^n\right )+2 c (b c-a d) \log \left (c+d x^n\right )}{2 d^3 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^(-1 + 2*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

(d*x^n*(-2*b*c + 2*a*d + b*d*x^n) + 2*c*(b*c - a*d)*Log[c + d*x^n])/(2*d^3*n)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.05, size = 55, normalized size = 0.92 \begin {gather*} \frac {\left (b c^2-a c d\right ) \log \left (c+d x^n\right )}{d^3 n}+\frac {x^n \left (2 a d-2 b c+b d x^n\right )}{2 d^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x^(-1 + 2*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

(x^n*(-2*b*c + 2*a*d + b*d*x^n))/(2*d^2*n) + ((b*c^2 - a*c*d)*Log[c + d*x^n])/(d^3*n)

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 56, normalized size = 0.93 \begin {gather*} \frac {b d^{2} x^{2 \, n} - 2 \, {\left (b c d - a d^{2}\right )} x^{n} + 2 \, {\left (b c^{2} - a c d\right )} \log \left (d x^{n} + c\right )}{2 \, d^{3} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

1/2*(b*d^2*x^(2*n) - 2*(b*c*d - a*d^2)*x^n + 2*(b*c^2 - a*c*d)*log(d*x^n + c))/(d^3*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (b x^{n} + a\right )} x^{2 \, n - 1}}{d x^{n} + c}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate((b*x^n + a)*x^(2*n - 1)/(d*x^n + c), x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 87, normalized size = 1.45 \begin {gather*} -\frac {a c \ln \left (d \,{\mathrm e}^{n \ln \relax (x )}+c \right )}{d^{2} n}+\frac {a \,{\mathrm e}^{n \ln \relax (x )}}{d n}+\frac {b \,c^{2} \ln \left (d \,{\mathrm e}^{n \ln \relax (x )}+c \right )}{d^{3} n}-\frac {b c \,{\mathrm e}^{n \ln \relax (x )}}{d^{2} n}+\frac {b \,{\mathrm e}^{2 n \ln \relax (x )}}{2 d n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(2*n-1)*(b*x^n+a)/(d*x^n+c),x)

[Out]

1/d/n*exp(n*ln(x))*a-1/d^2/n*exp(n*ln(x))*b*c+1/2*b/d/n*exp(n*ln(x))^2-c/d^2/n*ln(d*exp(n*ln(x))+c)*a+c^2/d^3/
n*ln(d*exp(n*ln(x))+c)*b

________________________________________________________________________________________

maxima [A]  time = 0.70, size = 83, normalized size = 1.38 \begin {gather*} a {\left (\frac {x^{n}}{d n} - \frac {c \log \left (\frac {d x^{n} + c}{d}\right )}{d^{2} n}\right )} + \frac {1}{2} \, b {\left (\frac {2 \, c^{2} \log \left (\frac {d x^{n} + c}{d}\right )}{d^{3} n} + \frac {d x^{2 \, n} - 2 \, c x^{n}}{d^{2} n}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

a*(x^n/(d*n) - c*log((d*x^n + c)/d)/(d^2*n)) + 1/2*b*(2*c^2*log((d*x^n + c)/d)/(d^3*n) + (d*x^(2*n) - 2*c*x^n)
/(d^2*n))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {x^{2\,n-1}\,\left (a+b\,x^n\right )}{c+d\,x^n} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^(2*n - 1)*(a + b*x^n))/(c + d*x^n),x)

[Out]

int((x^(2*n - 1)*(a + b*x^n))/(c + d*x^n), x)

________________________________________________________________________________________

sympy [A]  time = 26.97, size = 105, normalized size = 1.75 \begin {gather*} \begin {cases} \frac {\left (a + b\right ) \log {\relax (x )}}{c} & \text {for}\: d = 0 \wedge n = 0 \\\frac {\frac {a x^{2 n}}{2 n} + \frac {b x^{3 n}}{3 n}}{c} & \text {for}\: d = 0 \\\frac {\left (a + b\right ) \log {\relax (x )}}{c + d} & \text {for}\: n = 0 \\- \frac {a c \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{2} n} + \frac {a x^{n}}{d n} + \frac {b c^{2} \log {\left (\frac {c}{d} + x^{n} \right )}}{d^{3} n} - \frac {b c x^{n}}{d^{2} n} + \frac {b x^{2 n}}{2 d n} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+2*n)*(a+b*x**n)/(c+d*x**n),x)

[Out]

Piecewise(((a + b)*log(x)/c, Eq(d, 0) & Eq(n, 0)), ((a*x**(2*n)/(2*n) + b*x**(3*n)/(3*n))/c, Eq(d, 0)), ((a +
b)*log(x)/(c + d), Eq(n, 0)), (-a*c*log(c/d + x**n)/(d**2*n) + a*x**n/(d*n) + b*c**2*log(c/d + x**n)/(d**3*n)
- b*c*x**n/(d**2*n) + b*x**(2*n)/(2*d*n), True))

________________________________________________________________________________________